// 数字格式化
export const numberFormat = (amount, dec = 2) => {
  if (!amount) return 0
  let setAmount = amount + ''
  return Number(setAmount).toFixed(dec).toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',')
}